package proxy_aop;

import org.springframework.stereotype.Repository;
import proxy_jdk.Customer;

import java.util.ArrayList;
import java.util.List;

/**
 * 目标类定义目标方法(连接点)，这个类作为dao层出现
 */
@Repository
public class CustomerCRUD_aop {

    public void addCustomer(Customer customer) {
        System.out.println("添加成功");
    }

    public void deleteCustomer(String id) {
        System.out.println("删除成功");
    }

    public void updateCustomer(Customer customer) {
        System.out.println("更新成功");
    }

    public List<Customer> queryAllCustomers() {
        System.out.println("查找成功");
        List<Customer> customerList = new ArrayList<>();
        customerList.add(new Customer());
        customerList.add(new Customer());
        customerList.add(new Customer());
        return customerList;
    }
}
